#pragma once

struct posStackNode
{
	COORD pos;
	posStackNode* next;
};

class AISnake: public JY_Link::Stack_Link<posStackNode>
{
public:
	AISnake(COORD pos, char* image,char* map);
	~AISnake();
	void Show();
	void FindBestStep(COORD* posSet);
	void DFS(COORD pos);
	void Move();
	void SetMap(char* map);
	void GetRoard();
	void SetAim(COORD aim);
	COORD ReturnPos();
	COORD ReturnAim();
private:
	char temp_map[MAPHEIGHT * MAPWIDTH + 10] = { 0 };
	char image[3];
	COORD pos;
	COORD aim;
	//SnakeNode* p_next;
	JY_Link::Stack_Link<posStackNode>* stackPre;
	JY_Link::Stack_Link<posStackNode>* stackWalked;
};

